<?php
require_once 'connect.php';

$filter = false;
if(isset($_POST)) {
	$filter = $_POST['username'];
}
// connect to mysql database
connect();
// get game list
$gameList = getFavorites($filter);
// disconnect to mysql database
disconnect();

foreach ($gameList as $gameTitle) {
	echo $gameTitle . ',';
}
?>